class Feed::OrderMadeCreated < Feed
  validates :order_item_id,
    :presence =>true,
    :if => 'order_item_id.present?'
  validates :order_made_id,
    :presence =>true,
    :if => 'order_made_id.present?'

  def code
    ActiveSupport::StringInquirer.new('has_been_sent_to_factory')
  end

  def short_desc
    "#{order_made.creator_name}于#{
    order_made.order_made_on}向【#{
    order_made.factory_name}】<b>下单订做</b>【 #{
    order_made.order_made_count}件】"
  end

  def remark
    order_made.remark
  end

  def related_one
    order_made
  end
  
  def related_html_id
    "related_order_made_#{order_made.id}"
  end
  
  def related_type
    "related_order_made"
  end
end
